package com.cjs.zaiCiGaiJin;

public class Client {
	
	public static void main(String[] args) throws Exception{
		Factory f = new RealFactory();
		f.config(Product.class, ProductA.class, "A" ).config(Product.class, ProductB.class, "B" );
		
		Product a = f.newInstance(Product.class);
		Product b = f.newInstance(Product.class , "A");
		Product c = f.newInstance(Product.class , "B");
		
		a.run();
		b.run();
		c.run();
	}
}
